package com.powermanagertest;

import java.io.IOException;
import java.io.InputStream;
import java.io.UnsupportedEncodingException;
import java.net.SocketTimeoutException;


import android.graphics.Bitmap;
import android.os.Handler;

/**
 * ����ͼƬ���߳�
 * 
 * @author Poke
 * 
 */
public class DownlodThread implements Runnable {

    private Thread mThread;
    private Handler handler;
    private String DownPath;
    private Bitmap bitmap;
    private int handleWhat;

    private boolean isRun = false;

    public DownlodThread(Handler handler) {
        this.handler = handler;
    }

    public Bitmap getBitmap() {
        return bitmap;
    }

    /**
     * 
     * @param voucher
     *            ��(voucher��Path��Ϣ
     * @param couponBitmap
     * @param companyBitmap
     */
    public void startThread(String DownPath, int handleWhat) {
        this.DownPath = DownPath;
        this.handleWhat = handleWhat;
        isRun = true;
        mThread.start();

    }

    public void stopThread() {
        isRun = false;
    }

    @Override
    public void run() {
        while (isRun) {
            // InputStream is = GetBitmap.getNetInputStream(DownPath);
            // is.close();
        }

    }
}